public class Test {
    public static void main(String[] args) {
        SingleLinkedList myList = new SingleLinkedList();
        myList.createList();
        myList.display();

        myList.addFirst(99);
        myList.addFirst(99);
        myList.display();
        
        myList.addLast(99);
        myList.addLast(99);
        myList.display();

        myList.addIndex(3,10086);
        myList.addIndex(0,1);
        myList.display();
        System.out.println(myList.size());
        myList.addIndex(myList.size(), 0);
        myList.display();

        System.out.println("=======================");
        myList.remove(1);
        myList.remove(0);
        myList.remove(23);
        myList.display();

        myList.removeAllKey(99);
        myList.display();

        if(myList.contains(99)) {
            System.out.println("链表中有99");
        }
        if(myList.contains(12)) {
            System.out.println("链表中有12");
        }

        System.out.println("========================");
        myList.clear();
        myList.display();
        System.out.println("========================");

    }
}
